Skip to content

chore(release): version packages#55

Merged
muneebs merged 1 commit intomainfrom
changeset-release/main
Apr 22, 2026
Merged

chore(release): version packages#55
muneebs merged 1 commit intomainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@csrf-armor/nextjs@1.4.4

Patch Changes

  • #54 e3da9dc Thanks @muneebs! - fix(react): remove unnecessary csrfToken dependency from useCallback

    secureFetch previously listed csrfToken in its useCallback dependency array, causing the function reference to change every time the token updated. This made the CsrfContextValue unstable and triggered unnecessary re-renders in any component consuming useCsrf().

    The token equality check (newToken !== csrfToken) was also redundant because React's setState already bails out for identical primitive values. Removing both the dependency and the comparison fixes the re-render issue without changing behavior.

    Fixes Bug: Unneeded dependency causes unnecessary re-renders #53

@muneebs muneebs merged commit cbc02ac into main Apr 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Unneeded dependency causes unnecessary re-renders

1 participant